package com.soa.ws2http.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * GatewayWebserviceApi entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "gateway_webservice_api", schema = "public")
public class GatewayWebserviceApi implements java.io.Serializable {

	// Fields

	private String id;
	private String wsUrl;
	private String wsName;
	private String wsAction;
	private String wsMethod;
	private String wsNamespace;
	private String wsXml;
	private Integer sort;
	private String soapVersion;
	private String resultType;
	private String state;
	private String wsPath;
	private Set<GatewayWebserviceApiParam> gatewayWebserviceApiParams = new HashSet<GatewayWebserviceApiParam>(
			0);

	// Constructors

	/** default constructor */
	public GatewayWebserviceApi() {
	}

	/** minimal constructor */
	public GatewayWebserviceApi(String id) {
		this.id = id;
	}

	/** full constructor */
	public GatewayWebserviceApi(String id, String wsUrl, String wsName,
			String wsAction, String wsMethod, String wsNamespace, Integer sort,
			Set<GatewayWebserviceApiParam> gatewayWebserviceApiParams) {
		this.id = id;
		this.wsUrl = wsUrl;
		this.wsName = wsName;
		this.wsAction = wsAction;
		this.wsMethod = wsMethod;
		this.wsNamespace = wsNamespace;
		this.sort = sort;
		this.gatewayWebserviceApiParams = gatewayWebserviceApiParams;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "ws_url", length = 300)
	public String getWsUrl() {
		return this.wsUrl;
	}

	public void setWsUrl(String wsUrl) {
		this.wsUrl = wsUrl;
	}

	@Column(name = "ws_name", length = 300)
	public String getWsName() {
		return this.wsName;
	}

	public void setWsName(String wsName) {
		this.wsName = wsName;
	}

	@Column(name = "ws_action", length = 300)
	public String getWsAction() {
		return this.wsAction;
	}

	public void setWsAction(String wsAction) {
		this.wsAction = wsAction;
	}

	@Column(name = "ws_method", length = 300)
	public String getWsMethod() {
		return this.wsMethod;
	}

	public void setWsMethod(String wsMethod) {
		this.wsMethod = wsMethod;
	}

	@Column(name = "ws_namespace", length = 300)
	public String getWsNamespace() {
		return this.wsNamespace;
	}

	public void setWsNamespace(String wsNamespace) {
		this.wsNamespace = wsNamespace;
	}

	@Column(name = "sort")
	public Integer getSort() {
		return this.sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "gatewayWebserviceApi")
	public Set<GatewayWebserviceApiParam> getGatewayWebserviceApiParams() {
		return this.gatewayWebserviceApiParams;
	}

	public void setGatewayWebserviceApiParams(
			Set<GatewayWebserviceApiParam> gatewayWebserviceApiParams) {
		this.gatewayWebserviceApiParams = gatewayWebserviceApiParams;
	}

	@Column(name = "ws_xml")
	public String getWsXml() {
		return wsXml;
	}

	public void setWsXml(String wsXml) {
		this.wsXml = wsXml;
	}
	@Column(name = "soap_version")
	public String getSoapVersion() {
		return soapVersion;
	}

	public void setSoapVersion(String soapVersion) {
		this.soapVersion = soapVersion;
	}

	@Column(name = "result_type")
	public String getResultType() {
		return resultType;
	}

	public void setResultType(String resultType) {
		this.resultType = resultType;
	}

	@Column(name = "state")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "ws_path")
	public String getWsPath() {
		return wsPath;
	}

	public void setWsPath(String wsPath) {
		this.wsPath = wsPath;
	}
}